<template>
  <!-- 分类管理 -->
  <el-container>
    <basic-crud ref="crudRef" :apiAddParams="apiAddParams" :beforeAdd="beforeAdd" :option="option"
                businessUrl="/device/deviceClassifyController">
    </basic-crud>
  </el-container>
</template>

<script setup>

const option = ref({
  highlightCurrentRow: true,
  size: 'small',
  calcHeight: 10,
  isTableTree: true,
  menuWidth: 280,
  addSonBtn: true,
  column: [
    {
      label: "编号",
      prop: "code",
      search: true,
      sortable: true,
      readonly: true,
      disabled: true,
      placeholder: '系统自动生成',
    },
    {
      label: "名称",
      prop: "name",
      search: true,
      sortable: true,
      rules: [{required: true, message: "名称不能为空"}],
    },

    {
      label: "描述",
      prop: "des",
      search: true,
      sortable: true,
    },
    {
      label: "排序",
      prop: "orderNum",
      width: 80,
      type: "number",
      step: 10,
      rules: [
        {
          type: "number",
          message: "排序号必须为数字值",
          trigger: "blur",
        },
      ],
    }
  ]
});

</script>

<style lang="scss" scoped>

</style>
